package com.ruoyi.system.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excel.Type;
import com.ruoyi.common.xss.Xss;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 用户对象 sys_user
 *
 * @author ruoyi
 */
@Data
public class SysUserAddDto {

    @Xss(message = "用户账号不能包含脚本字符")
    @NotBlank(message = "用户账号不能为空")
    @Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符")
    @ApiModelProperty(value = "账号")
    private String userName;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "用户名称")
    private String nickName;

    @ApiModelProperty(value = "部门ID")
    private Long deptId;

    @ApiModelProperty(value = "角色组id")
    private Long[] roleIds;

    @ApiModelProperty(value = "岗位组")
    private Long[] postIds;

    @Email(message = "邮箱格式不正确")
    @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
    @ApiModelProperty(value = "用户邮箱")
    private String email;

    @Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符")
    @ApiModelProperty(value = "手机号码")
    private String phonenumber;


    @ApiModelProperty(value = "用户类型 1系统用户 2 愉快政 3 愉快办")
    private String userType;

    @ApiModelProperty(value = "工号")
    private String workNo;


    @ApiModelProperty(value = "0=男,1=女,2=未知")
    private String sex;


    @ApiModelProperty(value = "用户头像")
    private String avatar;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

}
